package com.ruoyi.dataSet.DTO;

import com.fasterxml.jackson.databind.ObjectMapper;
import java.io.IOException;

public class DocumentCreateRequest {
    private String datasetId;
    private String name;
    private String text;
    private String docType;
    private String docMetadata;
    private String indexingTechnique;
    private String docForm;
    private ProcessRule processRule;

    // Getters and Setters

    public String getDatasetId() {
        return datasetId;
    }

    public void setDatasetId(String datasetId) {
        this.datasetId = datasetId;
    }
    public String toJson() throws IOException {
        ObjectMapper objectMapper = new ObjectMapper();
        return objectMapper.writeValueAsString(this);
    }

    public String getDocForm() {
        return docForm;
    }

    public void setDocForm(String docForm) {
        this.docForm = docForm;
    }

    public String getDocMetadata() {
        return docMetadata;
    }

    public void setDocMetadata(String docMetadata) {
        this.docMetadata = docMetadata;
    }

    public String getDocType() {
        return docType;
    }

    public void setDocType(String docType) {
        this.docType = docType;
    }

    public String getIndexingTechnique() {
        return indexingTechnique;
    }

    public void setIndexingTechnique(String indexingTechnique) {
        this.indexingTechnique = indexingTechnique;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    public ProcessRule getProcessRule() {
        return processRule;
    }

    public void setProcessRule(ProcessRule processRule) {
        this.processRule = processRule;
    }
}
